<extend name="Public/common"/>
<block name="othercss">
</block>
<block name="header">
<div class="header">
    <div class="clearfix box">
        <!--<a class="save">保存</a>-->
        <a class="return" href="javascript:history.back(-1)"><i class="return-icon"></i></a>
        <h2>我的优惠券</h2>
    </div>
</div>
</block>
<block name="body">

<!--end header-->
<div class="container pt50">
    <ul class="wdyhj-list clearfix">
      <foreach name="list" item="item">
          <li <if condition="$item['is_use'] eq 1 OR ($item['nowtime'] lt $item['begin_time']) OR ($item['nowtime'] gt $item['end_time'])">class="false"</if>>
            <a>
                <img src="{$theme_path}/images/yhq<if condition="$item['is_use'] eq 1 OR ($item['nowtime'] lt $item['begin_time']) OR ($item['nowtime'] gt $item['end_time'])">2<else/>1</if>.png" width="100%"/>
                <div class="yhq-header">券</div>
                <div class="ys1">优惠券</div>
                <div class="ys2">
                    <div class="clearfix" style="font-weight: bold "><span style="font-size:35px">{$item.money|floattoint}</span><div class="span">￥</div></div>
                    <div class="tt">满{$item.cart_total}元使用</div>
                    <div class="tt1">
                        <if condition="$item['is_use'] eq 1">
                        已使用
                            <elseif condition="$item['nowtime'] lt $item['begin_time']"/>
                        未开放
                            <elseif condition="$item['nowtime'] gt $item['end_time']"/>
                        已过期
                         <else/>
                        {$item.end_time|stringtoday=2}前有效
                        </if>
                    </div>
                </div>
            </a>
        </li>
        </foreach>
    </ul>
</div>

</block>
<block name="footer"></block>
<block name="otherjs">
<script>
    $(function () {
        // 设置如果当价格长度超过80px（4个像素）时，改变文字大小
        $('.wdyhj-list li').each(function () {
            if($(this).find('.big').width()>80){
                $(this).find('.big').css('font-size','27px');
            }
        })

    })
</script>
</block>


